import Speech

func requestSpeechAuthorization() {
    SFSpeechRecognizer.requestAuthorization { authStatus in
        switch authStatus {
        case .authorized:
            print("语音识别已授权")
        case .denied:
            print("用户拒绝语音识别权限")
        case .restricted:
            print("设备限制语音识别")
        case .notDetermined:
            print("语音识别未授权")
        @unknown default:
            fatalError()
        }
    }
}